import Vue from 'vue'
// 直接将Vue组件作为Vue.extend的参数
import customChoiceModal from './customChoiceModal';

const showCustomChoiceModal = (data, config) =>
{
    data = data || null;
    const choiceTreeConstructor = Vue.extend(customChoiceModal);
    const instance = new choiceTreeConstructor({
        el: document.createElement("div")
    });

    document.querySelector("body").appendChild(instance.$el);
    return instance.openDialog(data, config);
};

export default showCustomChoiceModal;